const { Schema, model } = require('mongoose')

const userSchema = new Schema({
    __v: {
        type: Number,
        select: false
    },
    name: {
        type: String,
        required: true
    },
    password: {
        type: String,
        required: true,
        select: false
    },
    avatar_url: {
        type: String,
    },
    gender: {
        type: String,
        enum: ['male', 'female'],
        default: 'male',
        required: true
    }
}, { timestamps: true })

module.exports = model('User', userSchema)